package com.test.dao;

import com.test.entity.*;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface UserDao {

    //用户登录
    @SelectProvider(type=UserDaoProvider.class,method="userLogin")
    Users userLogin(String u_acount, String u_password);

    //用户登录
    @SelectProvider(type=UserDaoProvider.class,method="managerLogin")
    Users managerLogin(String u_acount, String u_password);

    //用户注册
    @SelectProvider(type=UserDaoProvider.class,method="insertuser")
    void  insertuser(String u_name,String u_acount,String u_password,String u_Identity);

    //用户注册
    @SelectProvider(type=UserDaoProvider.class,method="manaCreateUser")
    void  manaCreateUser(String u_name,String u_acount,String u_Identity);

    //校验用户是否存在
    @SelectProvider(type=UserDaoProvider.class,method="checkUser")
    String checkUser(String u_acount);

    //用户注销
    @DeleteProvider(type=UserDaoProvider.class,method="deleteAcount")
    int deleteAcount (String acount);

    //验证密码是否正确
    @SelectProvider(type=UserDaoProvider.class,method="checkPwd")
    String checkPwd(String u_acount);

    //修改密码
    @UpdateProvider(type=UserDaoProvider.class,method="updatepwd")
    int updatepwd (String acount,String u_newpwd);

    //添加基础信息
    @InsertProvider(type=UserDaoProvider.class,method="insertStuBaseInfo")
    int insertStuBaseInfo(StuAllInfoDto stuAllInfoDto);


    //查询基础信息
    @SelectProvider(type=UserDaoProvider.class,method="selectStuBaseInfo")
    StuAllInfoDto selectStuBaseInfo(String acount);

    //删除基础信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteStuBaseInfo")
    int deleteStuBaseInfo (String acount);

    //添加学籍信息
    @InsertProvider(type=UserDaoProvider.class,method="insertStuStatusInfo")
    int insertStuStatusInfo(StuAllInfoDto stuAllInfoDto);

    //删除学籍信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteStuStatusInfo")
    int deleteStuStatusInfo (String acount);

    //查询学籍信息
    @SelectProvider(type=UserDaoProvider.class,method="selectStuStatusInfo")
    StuAllInfoDto selectStuStatusInfo(String acount);

    //添加就业信息
    @InsertProvider(type=UserDaoProvider.class,method="insertStuJobInfo")
    int insertStuJobInfo(StuAllInfoDto stuAllInfoDto);

    //删除就业信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteStuJobInfo")
    int deleteStuJobInfo (String acount);

    //查询就业信息
    @SelectProvider(type=UserDaoProvider.class,method="selectStuJobInfo")
    StuAllInfoDto selectStuJobInfo(String acount);

    //添加教师基础信息
    @InsertProvider(type=UserDaoProvider.class,method="insertTeaBaseInfo")
    int insertTeaBaseInfo(TeaAllInfoDto teaAllInfoDto);
    //删除老师基础信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteTeaBaseInfo")
    int deleteTeaBaseInfo (String acount);
    //查询老师基础信息
    @SelectProvider(type=UserDaoProvider.class,method="selectTeaBaseInfo")
    TeaAllInfoDto selectTeaBaseInfo(String acount);

    //添加企业基础信息
    @InsertProvider(type=UserDaoProvider.class,method="insertCompBaseInfo")
    int insertCompBaseInfo(CompAllInfoDto compAllInfoDto);
    //删除企业基础信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteCompBaseInfo")
    int deleteCompBaseInfo (String acount);
    //查询企业基础信息
    @SelectProvider(type=UserDaoProvider.class,method="selectCompBaseInfo")
    CompAllInfoDto selectCompBaseInfo(String acount);

    //添加企业招聘信息
    @InsertProvider(type=UserDaoProvider.class,method="insertCompRecruitInfo")
    int insertCompRecruitInfo(CompAllInfoDto compAllInfoDto);
    //删除企业招聘信息
    @DeleteProvider(type=UserDaoProvider.class,method="deleteCompRecruitInfo")
    int deleteCompRecruitInfo (String acount);
    //查询企业招聘信息
    @SelectProvider(type=UserDaoProvider.class,method="selectCompRecruitInfo")
    CompAllInfoDto selectCompRecruitInfo(String acount);

    //查询所有老师的基础信息
    @SelectProvider(type=UserDaoProvider.class,method="selectAllTeacher")
    List<TeaAllInfoDto> selectAllTeacher();

    @SelectProvider(type=UserDaoProvider.class,method="findUserById")
    Users findUserById(String u_acount);

    @SelectProvider(type=UserDaoProvider.class,method="findByUsername")
    Users findByUsername(User user);

}
